<!DOCTYPE html>
<html xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <meta name="description" content="A fully featured admin theme which can be used to build CRM, CMS, etc.">
    <meta name="author" content="Coderthemes">
	
	<!-- jQuery  -->
    <script type="text/javascript" src="/static/plugins/jquery/jquery-3.6.0.min.js"></script>
	
	<!-- layui  -->
	<link rel="stylesheet" href="/static/plugins/layui/2.7.6/css/layui.css" media="all" />
	<script src="/static/plugins/layui/2.7.6/layui.js" charset="utf-8"></script>
	
	<link rel="stylesheet" href="/static/admin/css/mini-ease-edit.css">
</head>
<body>

	<form class="layui-form" id="formId" method="post" action="/web/business/tpDeptUserPoint/editDeptUserPoint">
		<!--第一行-->
		<div class="layui-form-item">
			<!--单号-->
			<div class="layui-inline layui-col-xs4 margin_r0">
				<div>
					<label class="layui-form-label">单号：</label>
					<div class="layui-input-block">
						<input type="text" name="bid" th:value="${dto.bid}" autocomplete="off"  readonly="readonly"  class="layui-input" lay-verify="required" >
					</div>
				</div>
			</div>
			<!--运营公司简称-->
			<div class="layui-inline layui-col-xs4 margin_r0">
				<div>
					<label class="layui-form-label">运营公司简称：</label>
					<div class="layui-input-block">
						<input type="text" name="operateCompanyCode" th:value="${dto.operateCompanyName}" autocomplete="off"  readonly="readonly"  class="layui-input" lay-verify="required" >
					</div>
				</div>
			</div>
			<!--运营公司编码-->
			<div class="layui-inline layui-col-xs4 margin_r0">
				<div>
					<label class="layui-form-label">运营公司编码：</label>
					<div class="layui-input-block">
						<input type="text" name="operateCompanyCode" th:value="${dto.operateCompanyCode}" id="operateCompanyCode" autocomplete="off"  readonly="readonly"  class="layui-input" lay-verify="required" >
					</div>
				</div>
			</div>
		</div>
		<!--第二行-->
		<div class="layui-form-item">
			<div class="layui-inline layui-col-xs4 margin_r0">
				<div>
					<label class="layui-form-label">评价类别：</label>
					<div class="layui-input-block">
						<input th:if="${dto.pointType} eq '0'" type="text" name="operateCompanyCode" th:value="表扬" autocomplete="off"  readonly="readonly"  class="layui-input" lay-verify="required" >
						<input th:if="${dto.pointType} eq '1'" type="text" name="operateCompanyCode" th:value="批评" autocomplete="off"  readonly="readonly"  class="layui-input" lay-verify="required" >
					</div>
				</div>
			</div>
			<div class="layui-inline layui-col-xs4 margin_r0">
				<div>
					<label class="layui-form-label">评价部门：</label>
					<div class="layui-input-block">
						<input type="text" name="organizationInfo" th:value="${dto.pointDept}"  autocomplete="off"  readonly="readonly"  class="layui-input" lay-verify="required" >
					</div>
				</div>
			</div>
			<div class="layui-inline layui-col-xs4 margin_r0">
				<div>
					<label class="layui-form-label">评价员工：</label>
					<div class="layui-input-block">
						<input type="text" name="pointUserInfo" th:value="${dto.pointUser}"  autocomplete="off"  readonly="readonly"  class="layui-input" lay-verify="required" >
					</div>
				</div>
			</div>

		</div>
		<!--第三行-->
		<div class="layui-form-item">
			<div class="layui-inline layui-col-xs12 margin_r0">
				<div>
					<label class="layui-form-label">评价事件：</label>
					<div class="layui-input-block">
						<input type="text" name="pointEvent" id="pointEvent"  th:value="${dto.pointEvent}" autocomplete="off"  readonly="readonly" class="layui-input" lay-verify="required" maxlength="50">
					</div>
				</div>
			</div>
		</div>
		<!--第四行-->
		<div class="layui-form-item">
			<div class="layui-inline layui-col-xs12 margin_r0">
				<div>
					<label class="layui-form-label">评价详情：</label>
					<div class="layui-input-block">
						<textarea name="pointDetail" id="pointDetail" placeholder="多行文本框" class="layui-textarea" maxlength="1000"  readonly="readonly" th:text="${dto.PointDetail}"></textarea>
					</div>
				</div>
			</div>
		</div>
		<!--第五行-->
		<div class="layui-form-item">
			<!--制单人-->
			<div class="layui-inline layui-col-xs4 layui-col-sm7 layui-col-md8 margin_r0">
				<div>
					<label class="layui-form-label">制单人：</label>
					<div class="layui-input-block">
						<input type="text" name="createUserInfo" th:value="${dto.createUserInfo}" autocomplete="off"  readonly="readonly"  class="layui-input" lay-verify="required" >
					</div>
				</div>
			</div>
			<!--制单人-->
			<div class="layui-inline layui-col-xs4 margin_r0">
				<div>
					<label class="layui-form-label">制单人部门：</label>
					<div class="layui-input-block">
						<input type="text" name="creatUserDept" th:value="${dto.creatUserDept}" autocomplete="off"  readonly="readonly"  class="layui-input" lay-verify="required" >
					</div>
				</div>
			</div>
		</div>
		<!--隐藏域-->
		<input type="hidden" name="pointDeptCode" id="pointDeptCode" th:value="${dto.pointDeptCode}"><!--评价的部门的编码-->
		<input type="hidden" name="nodeLft" id="nodeLft" th:value="${dto.NodeLft}">
		<input type="hidden" name="nodeRgt" id="nodeRgt" th:value="${dto.NodeRgt}">
		<input type="hidden" name="pointUserId" id="pointUserId" th:value="${dto.PointUserId}"><!--评价的员工的工号-->
		<input type="hidden" name="id" id="id" th:value="${dto.id}">
		<input type="hidden" name="createUser" id="createUser" th:value="${dto.loginUserId}"><!--制单人-->

		<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;"></fieldset>
		<div class="layui-form-item">
			<div class="layui-col-md1 layui-col-md-offset11">
				<div class="layui-btn-container">
					<button type="button" class="layui-btn" onclick="backPage()">返回</button>
				</div>
			</div>
		</div>
	</form>
	<script>

	function backPage(){
		var index = parent.layer.getFrameIndex(window.name); // 先得到当前 iframe 层的索引
		parent.layer.close(index);
	}
	layui.use(function(){
		var form = layui.form;
		var layer = layui.layer;
		// select 事件
		form.on('select(select-selectCompany)', function(data){
			//var elem = data.elem; // 获得 select 原始 DOM 对象
			var value = data.value; // 获得被选中的值
			//var othis = data.othis; // 获得 select 元素被替换后的 jQuery 对象
			$('#operateCompanyCode').val(value);

		});
	});
	function showModalSelectorOrg() {
		var w=($(window).width()*0.9);
		var h=($(window).height() - 50);
		layer.open({
			type: 2,
			area: [w+'px', h +'px'],
			fix: true,
			maxmin: false,
			shadeClose: true,
			shade:0.4,
			title: "选择",
			content: '/web/business/tpDeptUserPoint/toSelectorPointOrg'
		});
	}
	function showModalSelectorPointUser() {
		if($('#pointDeptCode').val()==null || $('#pointDeptCode').val()==''){
			layer.msg('请先选择要评价的部门!', {icon: 0});
			return;
		}
		var w=($(window).width()*0.9);
		var h=($(window).height() - 50);
		layer.open({
			type: 2,
			area: [w+'px', h +'px'],
			fix: true,
			maxmin: false,
			shadeClose: true,
			shade:0.4,
			title: "选择",
			content: '/web/business/tpDeptUserPoint/toSelectorPointUser?nodeLft='+$('#nodeLft').val() + '&nodeRgt=' + $('#nodeRgt').val()
		});
	}
	var el = document.getElementById('pointDetail');
	el.addEventListener('input',function () {
		var len =  txtCount(this); //   调用函数
		document.getElementById('textCount').innerHTML = len;
	});

	//函数 - 获取文本内容和长度
	function txtCount(el) {
		var val = el.value;
		var eLen = val.length;
		return eLen;
	}

	</script>

</body>
</html>
